function output = fn_dcdd_tax(delta,R1,D0,chi,s,phi,dist_d,d_min,d_max,kappa)

[~, uninsured_acc] = fn_insured_accounts(delta,R1,dist_d,d_min,d_max);

m_cost   = fn_mg_cost(delta,R1,D0,chi,s,phi,dist_d,d_min,d_max,kappa).*uninsured_acc;
non_zero = (fn_tax(delta,R1,D0,chi,s,phi,dist_d,d_min,d_max)>0);

output = m_cost.*non_zero;

end